<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{$title}</title>
<meta name="keywords" content="{$keyword}" />
<meta name="description" content="{$description}" />
<link rel="stylesheet" href="__STATIC__/css/public.css">
<link rel="stylesheet" href="__STATIC__/css/list.css">
<script src="__STATIC__/js/jquery.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>
<body>
    <!-- public header or signin login block -->
    <div class="header">
        <div class="header_c">
            <div class="logo"></div>
            <div class="loginBlock">
                <span class="signIn">注册</span>&nbsp;|&nbsp;<span class="logIn">登录</span>
            </div>
            <ul>
             <volist name="menu" id="vo">
              <li class="<eq name="Think.const.ACTION_NAME" value="$vo.active">current_li</eq>"><a href="__ROOT__/{$vo.url}">{$vo.name}</a></li> 
             </volist>
            </ul>
        </div>
    </div>
    
    <!-- current page start here -->
    <div class="currentPage">
       
        <!-- search area -->
        <div class="searchArea">
             <form action="{:U('Index/search')}" method="post">
			 <div class="searchLine">
                <input type="text" name="key" placeholder="输入区域或地铁关键词搜索">
                <button type="submit">搜  索</button>
                <a href="http://www.baidu.com" class="mapSearch"></a>
            </div>
			</form>	
            <dl class="hotArea">
                <dt>热门区域：</dt>
                <dd><a href="__ROOT__/index.php?m=Home&c=Index&a=rent2&search=地铁一号线">地铁一号线</a></dd>
                <dd><a href="__ROOT__/index.php?m=Home&c=Index&a=rent2&search=地铁二号线">地铁二号线</a></dd>
                <dd><a href="__ROOT__/index.php?m=Home&c=Index&a=rent2&search=中山区">中山区</a></dd>
                <dd><a href="__ROOT__/index.php?m=Home&c=Index&a=rent2&search=西岗区">西岗区</a></dd>
                <dd><a href="__ROOT__/index.php?m=Home&c=Index&a=rent2&search=高新园区">高新园区</a></dd>
            </dl>
        </div>
        
		
		
<script type="text/javascript">

function Filter(a,b){

    var $ = function(e){return document.getElementById(e);}

    var ipts = $('filterForm').getElementsByTagName('input'),result=[];

    for(var i=0,l=ipts.length;i<l;i++){

        if(ipts[i].getAttribute('to')=='filter'){

           result.push(ipts[i]);

       }

    }

   if($(a)){

        $(a).value = b;

        for(var j=0,len=result.length;j<len;j++){

           if(result[j].value==''){

               result[j].parentNode.removeChild(result[j]);

           }

       }

        document.forms['filterForm'].submit();

    }

    return false;

}

</script>
<form id="filterForm" action="{:U(Home/Index/rent2)}" method="post">
<input to="filter" type="hidden" id="zulinfs" name="zulinfs" value="{$zulinfs}" />
<input to="filter" type="hidden" id="area" name="area" value="{$area}" />
<input to="filter" type="hidden" id="price_area" name="price_area" value="{$price_area}" />
<input to="filter" type="hidden" id="huxing" name="huxing" value="{$huxing}" />
<input to="filter" type="hidden" id="mianji_area" name="mianji_area" value="{$mianji_area}" />
<input to="filter" type="hidden" id="chaoxiang" name="chaoxiang" value="{$chaoxiang}" />
</form>	
        <!-- filter area -->
        <div class="filterArea">
            <div class="filter_c">
                <div class="typeSelect">
                    <dl>
                        <dt>类型</dt>
                        <dd class="current_dd zulinfs_dd" onClick="Filter('zulinfs','合租');">好房合租</dd>
                        <dd class="zulinfs_dd" onClick="Filter('zulinfs','整租');">好房整租</dd>
                        <dd class="zulinfs_dd" onClick="Filter('zulinfs','直租');">好房直租</dd>
                    </dl>
                    <div>好房客租房  悦享美好明天 </div>
                </div>
                <div class="filterType">
                    <dl>
                        <dt>区域</dt>
                        <dd class="area_dd checked"onClick="Filter('area','areabx');">不限</dd>
                        <dd class="area_dd" onClick="Filter('area','中山区');"><i></i>中山区</dd>
                        <dd class="area_dd" onClick="Filter('area','沙河口区');"><i></i>沙河口区</dd>
                        <dd class="area_dd" onClick="Filter('area','西岗区');"><i></i>西岗区</dd>
                        <dd class="area_dd" onClick="Filter('area','甘井子区');"><i></i>甘井子区</dd>
                        <dd class="area_dd" onClick="Filter('area','高新园区');"><i></i>高新园区</dd>
                    </dl>
                    <dl>
                        <dt>租金</dt>
                        <dd class="price_dd checked" onClick="Filter('price_area','price_areabx');">不限</dd>
                        <dd class="price_dd" onClick="Filter('price_area','1000元以下');"><i></i>1000元以下</dd>
                        <dd class="price_dd" onClick="Filter('price_area','1000-1200元');"><i></i>1000-1200元</dd>
                        <dd class="price_dd" onClick="Filter('price_area','1200-1400元');"><i></i>1200-1400元</dd>
                        <dd class="price_dd" onClick="Filter('price_area','1400-1600元');"><i></i>1400-1600元</dd>
                    </dl>
                    <dl>
                        <dt>居室</dt>
                        <dd class="huxing_dd checked" onClick="Filter('huxing','huxingbx');">不限</dd>
                        <dd class="huxing_dd" onClick="Filter('huxing','一室');"><i></i>一室</dd>
                        <dd class="huxing_dd" onClick="Filter('huxing','二室');"><i></i>二室</dd>
                        <dd class="huxing_dd" onClick="Filter('huxing','三室');"><i></i>三室</dd>
                        <dd class="huxing_dd" onClick="Filter('huxing','四室');"><i></i>四室</dd>
                    </dl>
                    <dl>
                        <dt>面积</dt>
                        <dd class="mianji_dd checked" onClick="Filter('mianji_area','mianji_areabx');">不限</dd>
                        <dd class="mianji_dd" onClick="Filter('mianji_area','10㎡以下');"><i></i>10㎡以下</dd>
                        <dd class="mianji_dd" onClick="Filter('mianji_area','10-12㎡');"><i></i>10-12㎡</dd>
                        <dd class="mianji_dd" onClick="Filter('mianji_area','12-15㎡');"><i></i>12-15㎡</dd>
                        <dd class="mianji_dd" onClick="Filter('mianji_area','15-20㎡');"><i></i>15-20㎡</dd>
                        <dd class="mianji_dd" onClick="Filter('mianji_area','20㎡以上');"><i></i>20㎡以上</dd>
                    </dl>
                    <dl>
                        <dt>朝向</dt>
                        <dd class="chaoxiang_dd checked" onClick="Filter('chaoxiang','chaoxiangbx');">不限</dd>
                        <dd class="chaoxiang_dd" onClick="Filter('chaoxiang','东向');"><i></i>东向</dd>
                        <dd class="chaoxiang_dd" onClick="Filter('chaoxiang','南向');"><i></i>南向</dd>
                        <dd class="chaoxiang_dd" onClick="Filter('chaoxiang','西向');"><i></i>西向</dd>
                        <dd class="chaoxiang_dd" onClick="Filter('chaoxiang','北向');"><i></i>北向</dd>
                        <dd class="chaoxiang_dd" onClick="Filter('chaoxiang','南北向');"><i></i>南北向</dd>
                        <dd class="chaoxiang_dd" onClick="Filter('chaoxiang','东西向');"><i></i>东西向</dd>
                    </dl>
                </div>
            </div>
        </div>	
        
        <!-- listArea -->
        <div class="listArea">
            <div class="list_c">
                <div class="sortTitle">
                    <div class="currentDiv defaultSort"><a href="__ROOT__/index.php?m=&c=Index&a=rent2">默认排序</a></div>
                    <div class="priceSort"><a href="__ROOT__/index.php?m=&c=Index&a=rent2&canshu=price">价格</a></div>
                    <div class="squareSort"><a href="__ROOT__/index.php?m=&c=Index&a=rent2&canshu=mianji">面积</a></div>
                </div>
                <div class="listBlock">
                    <div class="sortList">
                        
	                 <volist name="pages1" id="vo">	
                        <div class="listPart">
                            <div class="listImg">
                                <img src="__ROOT__/Public/{$vo['imgurl']|substr=0,-1}" alt="{$vo['title']}">
                            </div>
                            <div class="listInfo">
                                <h4>{$vo['area']} {$vo['tube']} {$vo['huxing']} {$vo['chaoxiang']}</h4>
                                <div class="houseInfo">
                                    <span class="icon house"></span>
                                    <span class="square">{$vo.mianji}㎡</span>&nbsp;|&nbsp;
                                    <span class="houseType">{$vo.huxing}</span>&nbsp;|&nbsp;
                                    <span class="floor">{$vo.floor}层</span>&nbsp;|&nbsp;
                                    <span class="rentType">{$vo.zulinfs}</span>
                                </div>
                                <div class="locationInfo">
                                    <span class="icon loca"></span>
                                    <span class="location">{$vo.dizhi}</span>
                                </div>
                                <div class="tabs">
								<?php
								$arr = explode("|",$vo['peizhi']);
                                foreach ($arr as $v) {
                                echo '<span class="tab">'.$v.'</span>';
                                }
		                        ?>
                                </div>
                            </div>
                            <div class="moreInfo">
                                <div class="price">
                                    ￥<span class="number">{$vo.price}</span>  <span>元/月</span>
                                </div>
                                <a href="__ROOT__/index.php?m=Home&c=Index&a=rentcontent&id={$vo['id']}"><div class="moreButton">查看更多</div></a>
                            </div>
                        </div>
                     </volist>
				
				     <volist name="list" id="vo">	
					<div class="listPart">
						<div class="listImg">
							<img src="__ROOT__/Public/{$vo['imgurl']|substr=0,-1}" alt="{$vo['title']}">
						</div>
						<div class="listInfo">
							<h4>{$vo['area']} {$vo['tube']} {$vo['huxing']} {$vo['chaoxiang']}</h4>
							<div class="houseInfo">
								<span class="icon house"></span>
								<span class="square">{$vo.mianji}㎡</span>&nbsp;|&nbsp;
								<span class="houseType">{$vo.huxing}</span>&nbsp;|&nbsp;
								<span class="floor">{$vo.floor}层</span>&nbsp;|&nbsp;
								<span class="rentType">{$vo.zulinfs}</span>
							</div>
							<div class="locationInfo">
								<span class="icon loca"></span>
								<span class="location">{$vo.dizhi}</span>
							</div>
							<div class="tabs">
								<?php
								$arr = explode("|",$vo['peizhi']);
                                foreach ($arr as $v) {
                                echo '<span class="tab">'.$v.'</span>';
                                }
		                        ?>
							</div>
						</div>
						<div class="moreInfo">
							<div class="price">
								￥<span class="number">{$vo.price}</span>  <span>元/月</span>
							</div>
							<a href="__ROOT__/index.php?m=Home&c=Index&a=rentcontent&id={$vo['id']}"><div class="moreButton">查看更多</div></a>
						</div>
					</div>
				 </volist>
					 
                    </div>
                    <div class="pageControl">
                    {$page}
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <!-- public footer block -->
    <div class="footer">
        <div class="footLink"></div>
        <div class="copyRight">
            <div class="copyRight_c">
                <div>{$copyright} {$beian|htmlspecialchars_decode}</div>
                <ul>
             <volist name="menu" id="vo">
              <li><a href="__ROOT__/{$vo.url}">{$vo.name}</a></li> 
             </volist>
                </ul>
            </div>
            
        </div>
    </div>
    
    <!-- public aside block -->
    <ul class="aside">
        <li class="share"></li>
        <li class="comment"></li>
        <li class="wechat"></li>
        <li class="goTop"></li>
    </ul>
    
    <!-- customService block -->
    <div class="customService"></div>
    
    
    <!-- script area -->
    <script src="__STATIC__/js/list.js"></script>
    <script type="text/javascript">
    	$(function(){
    		var canshu = "{$canshu}";
//  		console.log(canshu);
    		if(canshu == "mianji"){
    			$(".currentDiv").css("background","#fff");
    			$(".squareSort").css("background","#db382b");
    			$(".squareSort a").css("color","#fff");
    		}else if(canshu == "price"){
    			$(".currentDiv").css("background","#fff");
    			$(".priceSort").css("background","#db382b");
    			$(".priceSort a").css("color","#fff");
    		}else if(canshu == "id"){
    			$(".currentDiv").css("background","#db382b");
    			$(".currentDiv a").css("color","#fff");
    		}
    		
//  		console.log("{$zulinfs}"+"; "+"{$area}"+"; "+"{$price_area}"+"; "+"{$huxing}"+"; "+"{$mianji_area}"+"; "+"{$chaoxiang}");
//  		var ddVal = $(".current_dd").text();
    		var dd_leng = $(".zulinfs_dd").length;
    		var ddzulin = $(".zulinfs_dd").map(function(index,elem) {
	            return $(elem).text();
	        }).get();
	        for(var i=0;i<dd_leng;i++){
	        	if(ddzulin[i] == "好房"+"{$zulinfs}"){
	        		$(".zulinfs_dd").css("color","#333");
	        		$(".zulinfs_dd").eq(i).css("color","#db382b");
//	        		console.log("ceshi "+$(".zulinfs_dd").eq(i).html());
	        		break;
	        	}
	        }
	        
	        setFilterType = function(ddclass, phpCanshu){
//	        	console.log("让我瞅瞅"+ddclass+"; "+phpCanshu);
	        	var fdd_length = $("."+ddclass+"").length;
	        	var fdd_arry = $("."+ddclass+"").map(function(index,elem) {
		            return $(elem).text();
		        }).get();
		        
		        for(var i=0;i<fdd_length;i++){
		        	if(fdd_arry[i] == ""+phpCanshu+""){
		        		$("."+ddclass+"").eq(0).css("color","#333");
		        		$("."+ddclass+"").eq(i).addClass("checked");
//		        		console.log("ceshi "+$("."+ddclass+"").eq(i).text());
		        		break;
		        	}
		        }
	        };
	        
	        setFilterType("area_dd","{$area}");
	        setFilterType("price_dd","{$price_area}");
	        setFilterType("huxing_dd","{$huxing}");
	        setFilterType("mianji_dd","{$mianji_area}");
	        setFilterType("chaoxiang_dd","{$chaoxiang}");
    	});
    </script>
</body>
</html>